$("#fh").click(function () {
       layer.msg("返回上一级页面")
})
$("#sx").click(function () {
    window.location = 'sealLog.html';
})
var sealLogtableI = null;
function  sealLogRefre(){
    sealLogtableI.reload('sealLogtableId');
}

layui.use(['table', 'laydate','form'], function(){
        var table = layui.table,
        laydate = layui.laydate,
        form = layui.form;
        laydate.render({
                elem: '#rq', //指定元素
        });

    sealLogtableI = table.render({
                elem: '#test'
                ,url:'/sealLog/getAll'
                ,toolbar:'#toolbarDemo'
                ,id:'sealLogtableId'
                ,page:{
                        limit:10,
                        limits:[10,12,14],
                        layout:['count','prev','page','next','limit'],
                        groups:2
                    }
                ,cols: [
                    [
                          {type: 'checkbox', fixed: 'left'}
                        ,{field:'sealLogId', width:120, title: '序号', sort: true}
                        ,{field:'sealAdministratorName', width:150, title: '管理员名称',align:'center'}
                        ,{field:'sealUserAccount', width:150, title: '用户账号',align:'center'}
                        ,{field:'sealUserNickname', width:200, title: '用户昵称',align:'center'}
                         ,{field:'sealExecutionTime', title: '执行时间',  width: 200,align:'center'}
                        ,{field:'sealLogType', title: '类型',  width: 230,align:'center'}
                        ,{field:'sealLogUnsealingRemarks', title: '解封备注',  minWidth: 150,align:'center'}
                        // ,{fixed: '', title:'操作', minWidth: 150,toolbar: '#barDemo',align:'center'}
                ]
                ],
                skin: 'line',
                parseData:function (res){
                        return{
                                "code":res.code, // 解析接口状态
                                "msg": res.msg, // 解析提示文本
                                "count": res.count, // 解析总条数
                                "data": res.data // 解析数据列表
                        };
                }
        });


        form.on('submit(go)',function (d){
                d = d.field;
                console.log(d);
                table.reload('sealLogtableId',{
                        where:{
                            sealAdministratorName:d.sealAdministratorName,
                            sealUserAccount:d.sealUserAccount,
                            sealUserNickname:d.sealUserNickname,
                            sealLogType:d.sealLogType,
                            sealExecutionTime:d.sealExecutionTime
                        }
                });
        })
});